package com.kurumi.autoprint.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.kurumi.autoprint.interceptor.LoginSecurityInterceptor;

@Configuration
public class MyWebAppConfigure extends WebMvcConfigurerAdapter {
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new LoginSecurityInterceptor()).
		excludePathPatterns("/printIndex").excludePathPatterns("/print/**").excludePathPatterns("/ipjson").
		excludePathPatterns("/admin/login").excludePathPatterns("/admin/logout").
		excludePathPatterns("/pay/**").
		excludePathPatterns("/admin/userLogin").
	  	addPathPatterns("/**");
		super.addInterceptors(registry);
		
	}

}
